<extend name="Layout/layout"/>
<block name="style">
<style>
.labelwidth{ width:280px; }
.layui-input-block{ margin-left:320px; }
.layui-input-block .layui-input{width:80%;}
.layui-input-block .layui-select-fly{ height: 35px; border-radius: 8px; padding: 0px 5px; border: 1px solid #D2D2D2!important; }
</style>
</block>
<block name="body">
    <div class="main-title">
        <h2>{:isset($info['uid'])?'编辑':'新增'}用户</h2>
    </div>
    <form action="{$formSubmit}" method="post" class="form-horizontal">
        
        <input type="hidden" name="uid" value="{$info.uid}">
        
        <div class="layui-form-item">
            <if condition="$info['uid']">
                <label class="layui-form-label labelwidth">用户昵称<span class="check-tips">（修改用户昵称）</span></label>
            <else />
                <label class="layui-form-label labelwidth">用户名<span class="check-tips">（用户名会作为默认的昵称）</span></label>
            </if>
            <div class="layui-input-block">
                <input type="text" class="text input-large layui-input" name="username" value="{$info.nickname|default=''}">
            </div>
        </div>
        
        <div class="layui-form-item">
            <label class="layui-form-label labelwidth">密码<span class="check-tips">（用户密码不能少于6位）</span></label>
            <div class="layui-input-block">
                <input type="password" class="text input-large layui-input" name="password" onclick="javascript:this.value='';" value="{:isset($info['uid'])?'InitialPassword':''}">
            </div>
        </div>
        
        <div class="layui-form-item">
            <label class="layui-form-label labelwidth">确认密码</label>
            <div class="layui-input-block">
                <input type="password" class="text input-large layui-input" name="repassword" onclick="javascript:this.value='';" value="{:isset($info['uid'])?'InitialPassword':''}">
            </div>
        </div>
        
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="btn submit-btn ajax-post" id="submit" type="submit" target-form="form-horizontal">确 定</button>
                <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
            </div>
        </div>
        
    </form>
</block>

<block name="script">
    <script type="text/javascript">
        //导航高亮
        //highlight_subnav('{:U('User/index')}');
    </script>
</block>
